package Decorator;

/**
 * 装饰器抽象类
 */
public abstract class CoffeeDecorator implements Coffee {

    //静态代理
    /**
     * 静态代理：
     * 创建目标  创建代理对象  将目标传给代理对象
     */
    protected final Coffee decoratorCoffee;

    public CoffeeDecorator(Coffee decoratorCoffee) {
        this.decoratorCoffee = decoratorCoffee;
    }

    @Override
    public double getCost() {
        return decoratorCoffee.getCost();
    }

    @Override
    public String getDescription() {
        return decoratorCoffee.getDescription();
    }
}
